using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace comm.objst
{
    [Serializable]
    public class TableStar : ICodeReplace
    {
        #region 2013-1-4 19:16:52
        public const string KEY_STAR_ID = "StarId";
        public const string NAME = "Name";
        public const string HERO_COUNT = "HeroCount";
        public const string AREA_COUNT = "AreaCount";
        public const string SPACE_COUNT = "SpaceCount";
        public const string CREATE_TIME = "CreateTime";

        #endregion
        public comm.CodeFill FillRegion()
        {
            return new CodeFill(CodeFillType.ORM_CONST, this);
        }

        private string _starId = null;
        [OrmAttr(true)]
        public string StarId
        {
            get
            {
                if (_starId == null)
                {
                    _starId = "";
                }
                return _starId;
            }
            set { _starId = value; }
        }

        private string _name = null;
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public int HeroCount { get; set; }
        public int AreaCount { get; set; }
        public int SpaceCount { get; set; }

        private DateTime _createTime = DateTime.Now;
        public DateTime CreateTime
        {
            get { return _createTime; }
            set { _createTime = value; }
        }
    }

    [Serializable]
    public class TableSpace : ICodeReplace
    {
        #region 2013-1-4 19:16:52
        public const string KEY_SPACE_ID = "SpaceId";
        public const string NAME = "Name";
        public const string STAR_ID = "StarId";
        public const string FACTION_ID = "FactionId";
        public const string OCCUPY_TYPE = "OccupyType";
        public const string STATE = "State";
        public const string CREATE_TIME = "CreateTime";

        #endregion
        public comm.CodeFill FillRegion()
        {
            return new CodeFill(CodeFillType.ORM_CONST, this);
        }

        private string _spaceId = null;
        [OrmAttr(true)]
        public string SpaceId
        {
            get
            {
                if (_spaceId == null)
                {
                    _spaceId = "";
                }
                return _spaceId;
            }
            set { _spaceId = value; }
        }

        private string _name = null;
        public string Name
        {
            get
            {
                if (_name == null)
                {
                    _name = "";
                }
                return _name;
            }
            set { _name = value; }
        }

        private string _starId = null;
        public string StarId
        {
            get
            {
                if (_starId == null)
                {
                    _starId = "";
                }
                return _starId;
            }
            set { _starId = value; }
        }

        private string _factionId = null;
        public string FactionId
        {
            get
            {
                if (_factionId == null)
                {
                    _factionId = "";
                }
                return _factionId;
            }
            set { _factionId = value; }
        }

        public SpaceOccupyType OccupyType { get; set; }
        public SpaceState State { get; set; }

        private DateTime _createTime = DateTime.Now;
        public DateTime CreateTime
        {
            get { return _createTime; }
            set { _createTime = value; }
        }
    }
}
